package com.tongji.seller.command
{
	import com.tongji.seller.events.UpdateItemImageEvent;
	import com.tongji.seller.model.StoreProductModel;
	import com.tongji.seller.service.StoreProductService;
	
	import org.robotlegs.mvcs.Command;
	
	
	/**
	 *caddy
	 *2012-2-7
	 *
	 */
	public class UpdateImageCommand extends Command
	{
		[Inject]
		public var event:UpdateItemImageEvent;
		
		[Inject]
		public var service:StoreProductService;
		
		[Inject]
		public var model:StoreProductModel;
		
		
		override public function execute():void
		{
			switch(event.type)
			{
				case UpdateItemImageEvent.UPDATE_IMAGE:
					service.updateStoreItemImgInfo(event.itemID, event.imageList);
					break;
				case UpdateItemImageEvent.UPDATE_RESULT:
					break;
				default:
					break;
			}
		}
	}
}